home *** CD-ROM | disk | FTP | other *** search
- From: LittleGuyRascal@msn.com (Gregory Saxton)
- Subject: RE: Help! C++ undef array problem
- Date: 27 Feb 96 02:43:50 -0800
- References: <4gnrm0$gcq@vista.hevanet.com>
- Message-ID: <00001a81+0000a888@msn.com>
- Path: news.msn.com!msn.com
- Newsgroups: comp.lang.c++
- Organization: The Microsoft Network (msn.com)
-
- In a nutshell no, 'n' will not be passed because bx is an automatic
- variable class member. If you change bx to be int * bx; and allocate
- the array in your constructor you it will work.
-
- Sea::Sea(HINSTANCE hInst, char far* name, int n)
- {
- //
- // Try this - and remove the private automatic declaration of bx[n]
- from the class.
- //
- bx = new int[n];
-
- for(int i=1;i<=n;i++) {
- bx[i]= 3 }
- }
-